<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@include file="/common/taglibs.jsp" %>
<!--头部（包含标题和logo等内容）-->
<div class="header bg-white clearfix">
	<input type="hidden" value="${project.id }" id="projectId"/>
	<div class="pull-left">
		<div class="projects-logo" id="logoButton">
			<c:if test="${project.logo!=null && project.logo!='' }">
				<img src="${project.logo }" width="100" height="100" />
			</c:if>
			<c:if test="${project.logo==null || project.logo=='' }">
				<div class="first-word">${fn:substring(project.name, 0, 1)}</div> 
			</c:if>
		</div>
	</div>
	<div class="pull-left title text-left">
		<p class="elli">${project.name }</p>
<%-- 		<c:choose>
			<c:when test="${user.type==1 }">
				<div class="pull-left button text-center follow-people" data-toggle="tooltip" title="点击添加跟进人">
					<p class="elli" data-toggle="modal" data-target="#add-people-modal">跟进人：
						<c:forEach items="${project.proFollowList }" var="follow">
							<span>${follow.user.userName }</span>
						</c:forEach>
					</p>
				</div>
			</c:when>
			<c:otherwise>
				<c:if test="${proType==1 }">
					<c:if test="${authorization ==1 }">
						<div class="pull-left button text-center follow-people" data-toggle="tooltip" title="点击添加跟进人">
							<p class="elli" data-toggle="modal" data-target="#add-people-modal">跟进人：
								<c:forEach items="${project.proFollowList }" var="follow">
									<span>${follow.user.userName }</span>
								</c:forEach>
							</p>
						</div>
					</c:if>
					<c:if test="${authorization !=1 }">
						<div class="pull-left button text-center follow-people" data-toggle="tooltip" title="点击添加跟进人">
							<p class="elli" data-toggle="modal" data-target="#no-permission-modal">跟进人：
								<c:forEach items="${project.proFollowList }" var="follow">
									<span>${follow.user.userName }</span>
								</c:forEach>
							</p>
						</div>
					</c:if>
				</c:if>
			</c:otherwise>
		</c:choose> --%>
		<div class="pull-left button text-center">
			<p class="btn-audit elli" data-toggle="modal" data-target="#now-progress-modal">
				<span data-toggle="tooltip" title="点击修改进度">项目进度:
					<i id="progress">${project.userProgress.name }</i>
				</span>
			</p>
<%-- 			<c:if test="${authorization ==1 }">
				<p class="btn-audit elli" data-toggle="modal" data-target="#now-progress-modal">
					<span data-toggle="tooltip" title="点击修改进度">项目进度:
						<i id="progress">${project.userProgress.name }</i>
					</span>
				</p>
			</c:if>
			<c:if test="${authorization ==0 }">
				<p class="btn-audit elli" data-toggle="modal" data-target="#no-permission-modal">
					<span>项目进度:
						<i id="progress">${project.userProgress.name }</i>
					</span>
				</p>
			</c:if> --%>
		</div>
		<div class="pull-left button text-center">
			<p class="btn-priority elli" data-toggle="modal" data-target="#now-priority-modal">
				<!--项目优先级-->
				<span data-toggle="tooltip" title="点击调整优先级">项目优先级:
					<i id="priority">${project.unitvo.name }</i>
				</span>
			</p>
<%-- 			<c:if test="${authorization ==1 }">
				<p class="btn-priority elli" data-toggle="modal" data-target="#now-priority-modal">
					<!--项目优先级-->
					<span data-toggle="tooltip" title="点击调整优先级">项目优先级:
						<i id="priority">${project.unitvo.name }</i>
					</span>
				</p>
			</c:if>
			<c:if test="${authorization ==0 }">
				<p class="btn-priority elli" data-toggle="modal" data-target="#no-permission-modal">
					<!--项目优先级:
					<span data-toggle="tooltip" title="点击调整优先级">${project.unitvo.name }</span>-->
					<span>项目优先级:
						<i id="priority">${project.unitvo.name }</i>
					</span>
				</p>
			</c:if> --%>
		</div>
	</div>
	<!--添加跟进人模态框-->
    <div class="modal fade" id="add-people-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	    <div class="modal-dialog">
	        <div class="modal-content">
	            <div class="modal-header text-center">
	                <h4 class="modal-title">添加跟进人</h4>
	            </div>
	            <div class="modal-body">
	            	<div class="hot text-left">
						<!--<div class="hot-title">跟进人</div>-->
						<div class="hot-bd">
							<div class="hot-item clearfix" data-liffect="bounceIn">
								<%-- <c:forEach items="${user.invitationLsit }" var="invite">
									<c:if test="${invite.sendStatus == 2 }">
										<span data-value="${invite.receiveUser.id }">${invite.receiveUser.userName }</span>
									</c:if>
								</c:forEach> --%>
							</div>
						</div>
					</div>
	            	<div class="item clearfix">
	            		<input type="text" id="search-person" class="pull-left"  placeholder="请输入关键字搜索">
	            	</div>
	            	<div class="item select-people clearfix text-left followChoose">
	            	</div>
	            </div>
	            <div class="modal-footer">
	            	<div class="selected clearfix">
	            		<span class="handing pull-left">已选择：</span>
   						<c:forEach items="${project.proFollowList }" var="follow">
	            			<span class="people pull-left"><i class="name followInput" data-value="${follow.user.id }">${follow.user.userName }</i><i class="iconfont icon-shanchu del"></i></span>
   						</c:forEach>
	            	</div>
	                <button type="button" class="btn btn-default cancel" data-dismiss="modal">关闭</button>
	                <button type="button" class="btn save">保存</button>
	            </div>
	        </div>
	    </div>
	</div>	
	<!--当前进度模态框-->
	<div class="modal fade" id="now-progress-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content text-center">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4 class="modal-title text-center">当前进度</h4>
				</div>
				<div class="modal-body" style="padding-bottom:8px;">
					<div class="clearfix text-left bd-box">
						<div class="call-name pull-left"><span class="blue-start">*</span>进度：</div>
						<div class="pull-left select-box">
							<a class="btn-unfold"><span id="changPrograss" value="${project.userProgress.id }">${project.userProgress.name }</span><i class="pull-right iconfont icon-control-arr-copy-copy"></i></a>
							<div class="options">
								<%-- <c:if test="${user.type ==1 }">
									<c:forEach items="${user.userProgressList }" var="progress">
										<c:if test="${progress.id == project.userProgress.id }">
											<a class="options-item selected" value="${progress.id }">${progress.name }<i class="pull-right iconfont icon-gou"></i></a>
										</c:if>
										<c:if test="${progress.id != project.userProgress.id }">
											<a class="options-item" value="${progress.id }">${progress.name }<i class="pull-right iconfont icon-gou"></i></a>
										</c:if>
									</c:forEach>
								</c:if>
								<c:if test="${user.type ==2 }">
									<c:forEach items="${upList }" var="progress">
										<c:if test="${progress.id == project.userProgress.id }">
											<a class="options-item selected" value="${progress.id }">${progress.name }<i class="pull-right iconfont icon-gou"></i></a>
										</c:if>
										<c:if test="${progress.id != project.userProgress.id }">
											<a class="options-item" value="${progress.id }">${progress.name }<i class="pull-right iconfont icon-gou"></i></a>
										</c:if>
									</c:forEach>
								</c:if>  --%>
<%-- 								<c:if test="${proType==0 }">
									<c:forEach items="${user.userProgressList }" var="progress">
										<c:if test="${progress.id == project.userProgress.id }">
											<a class="options-item selected" value="${progress.id }">${progress.name }<i class="pull-right iconfont icon-gou"></i></a>
										</c:if>
										<c:if test="${progress.id != project.userProgress.id }">
											<a class="options-item" value="${progress.id }">${progress.name }<i class="pull-right iconfont icon-gou"></i></a>
										</c:if>
									</c:forEach>
								</c:if>
								<c:if test="${proType==1 }">
									<c:forEach items="${parentUser.userProgressList }" var="progress">
										<c:if test="${progress.id == project.userProgress.id }">
											<a class="options-item selected" value="${progress.id }">${progress.name }<i class="pull-right iconfont icon-gou"></i></a>
										</c:if>
										<c:if test="${progress.id != project.userProgress.id }">
											<a class="options-item" value="${progress.id }">${progress.name }<i class="pull-right iconfont icon-gou"></i></a>
										</c:if>
									</c:forEach>
								</c:if> --%>
							</div>
						</div>
					</div>
				</div>
				<div class="modal-footer">
					<p>
						<button type="button" class="btn btn-default cancel" data-dismiss="modal">取消</button>
						<button type="button" class="btn btn-primary confirm">确认</button>
					</p>
				</div>
			</div>
		</div>
	</div>
	<!--当前优先级模态框-->
	<div class="modal fade" id="now-priority-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content text-center">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4 class="modal-title text-center">当前优先级</h4>
				</div>
				<div class="modal-body" style="padding-bottom:8px;">
					<div class="clearfix text-left bd-box">
						<div class="call-name pull-left"><span class="blue-start">*</span>优先级：</div>
						<div class="pull-left select-box">
							<a class="btn-unfold" value="${project.unit }"><span id="changUnit" value="${project.unit }">${project.unitvo.name }</span><i class="pull-right iconfont icon-control-arr-copy-copy"></i></a>
							<div class="options">
								<c:forEach items="${unitList }" var="unit">
									<c:if test="${project.unit != unit.id }">
										<a class="options-item" value="${unit.id }">${unit.name }<i class="pull-right iconfont icon-gou"></i></a>
									</c:if>
									<c:if test="${project.unit == unit.id }">
										<a class="options-item selected" value="${unit.id }">${unit.name }<i class="pull-right iconfont icon-gou"></i></a>
									</c:if>
								</c:forEach>
							</div>
						</div>
					</div>
				</div>
				<div class="modal-footer">
					<p>
						<button type="button" class="btn btn-default cancel" data-dismiss="modal">取消</button>
						<button type="button" class="btn btn-primary confirm">确认</button>
					</p>
				</div>
			</div>
		</div>
	</div>
</div>
<!--项目导航-->
<div class="project-navbar bg-white text-center">
	<ul class="clearfix" style="width:520px;">
		<li><a href="/project/projectDetail/${project.id}">项目资料</a></li>
		<li><a href="/project/projectNoteView/${project.id}">投资笔记</a></li>
		<li><a href="/project/projectInvestigateFile/${project.id }">尽调文档</a></li>
		<li><a href="/project/projectFile/${project.id }">其他文档</a></li>
		<!--<li><a href="#">项目评分</a></li>
		<li><a href="/resources/src/action-record.jsp">操作记录</a></li>-->
	</ul>
</div>

<!--非跟进人提示模态框-->
<div class="modal fade" id="no-permission-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<input type="hidden" value="" id="del_prpgrass"/>
	<div class="modal-dialog">
		<div class="modal-content text-center">
			<div class="modal-body">
				<div class="text-tip">你不是该项目的跟进人，无法进行此项操作！</div>
			</div>
			<div class="modal-footer">
					<button type="button" class="btn btn-primary confirm" data-dismiss="modal">确认</button>
			</div>
		</div>
	</div>
</div>
